home *** CD-ROM | disk | FTP | other *** search
- ! DISPLAY
- SEQ formatted GEOS file V1.0
- Olivetti PR2300
- OP V2.0 or higher
- BLASTER'S CONVERTER V2.5
- COPE SOURCE V1.0
- DL870517
- COPE EDITOR V1.0
- ; Routines to print the values
- Display
- ldx DISLEN
- beq Exit
- stx TempDislen
- lda #<Yvalue
- sta YPos
- lda #<Xvalue
- sta XPos
- lda #>Xvalue
- sta XPos+1
- lda #32
- jmp Loopz
- dec TempDislen
- ldx TempDislen
- lda DXSBUF,X
- Loopz
- jsr GetCharWidth
- sta curCharWidth
- lda XPos
- sbc curCharWidth
- sta XPos
- sta AP1
- dec AP1
- sta R11
- lda XPos+1
- sta R11+1
- lda YPos
- sta R1+1
- jsr PutChar
- ldx TempDislen
- bne Loop
- jsr i_Rectangle
- .Byte Yvalue-6
- .Byte Yvalue+2
- .Word Xvalue-85
- .Word Xvalue
- XPos .Byte 0,0
- YPos .Byte 0
- TempDislen .Byte 0
- curCharWidth .Byte 0
- ;---------
- keypress .Byte 0
- IconCall
- lda R0
- sta keypress
- IconCall2
- lda keypress
- cmp #16
- bcs Skip1
- ldx Mode
- bmi binarylp
- bne hexlp
- declp
- cmp #10
- bcs notdecchar
- jsr Keyin
- jsr DECBIN
- jsr BINDEC
- jsr Display
- notdecchar
- Skip1
- binarylp
- cmp #2
- bcs notbinchar
- jsr Keyin
- jsr ST2BIN
- jsr BIN2ST
- jsr Display
- notbinchar
- hexlp
- jsr Keyin
- Jsr HEXBIN
- jsr BINHEX
- jsr Display
- Keyin
- ldx Mode
- lda Keyinlen
- cmp charinmode,x
- bcs nomorechar
- ldx Keyinlen
- adc #48
- cmp #58
- bcc ok
- adc #6
- sta KINBUF,X
- inc Keyinlen
- nomorechar
- charinmode .Byte 16,5,4 ; mode 0 is binary, mode 1 is decimal,
- ; mode 2 is hex
- Mode .Byte 1
- TextStrings
- jsr $C1AE ; iputstring
- .Word Icon_X_Pos*8+8
- .Byte Icon_Y_Pos+10
- .Byte '7',20,Icon_X_Pos*8+8+3*8,0
- .Byte '8',20,Icon_X_Pos*8+8+6*8,0
- .Byte '9',20,Icon_X_Pos*8+8+9*8,0
- .Byte 'F',20,Icon_X_Pos*8+8+12*8,0
- .Byte '/',0
- jsr $C1AE ; iputstring
- .Word Icon_X_Pos*8+8
- .Byte Icon_Y_Pos+10+1*16
- .Byte '4',20,Icon_X_Pos*8+8+3*8,0
- .Byte '5',20,Icon_X_Pos*8+8+6*8,0
- .Byte '6',20,Icon_X_Pos*8+8+9*8,0
- .Byte 'E',20,Icon_X_Pos*8+8+12*8,0
- .Byte '*',0
- jsr $C1AE ; iputstring
- .Word Icon_X_Pos*8+8
- .Byte Icon_Y_Pos+10+2*16
- .Byte '1',20,Icon_X_Pos*8+8+3*8,0
- .Byte '2',20,Icon_X_Pos*8+8+6*8,0
- .Byte '3',20,Icon_X_Pos*8+8+9*8,0
- .Byte 'D',20,Icon_X_Pos*8+8+12*8,0
- .Byte '-',0
- jsr $C1AE ; iputstring
- .Word Icon_X_Pos*8+8
- .Byte Icon_Y_Pos+10+3*16
- .Byte '0',20,Icon_X_Pos*8+8+3*8,0
- .Byte 'A',20,Icon_X_Pos*8+8+6*8,0
- .Byte 'B',20,Icon_X_Pos*8+8+9*8,0
- .Byte 'C',20,Icon_X_Pos*8+8+12*8,0
- .Byte '+',0
- jsr $C1AE ; iputstring
- .Word Icon_X_Pos*8+2
- .Byte Icon_Y_Pos+09+4*16
- .Byte 'HEX',20,Icon_X_Pos*8+4+3*8,0
- .Byte 'DEC',20,Icon_X_Pos*8+4+6*8,0
- .Byte 'BIN',20,Icon_X_Pos*8+8+12*8,0
- .Byte '=',0
- jsr $C1AE ; iputstring
- .Word Icon_X_Pos*8+8
- .Byte Icon_Y_Pos+10+6*16
- .Byte 'C',20,Icon_X_Pos*8+4+3*8,0
- .Byte 'CA',20,Icon_X_Pos*8+4+6*8,0
- .Byte 'Del',20,Icon_X_Pos*8+3+9*8,0
- .Byte 'Exit',0
- jsr $C1AE ; iputstring
- .Word Icon_X_Pos*8+1
- .Byte Icon_Y_Pos+10+5*16
- .Byte 'AND',20,Icon_X_Pos*8+2+3*8,0
- .Byte 'EOR',20,Icon_X_Pos*8+1+6*8,0
- .Byte 'ORA',0
- ;*****
- ClearAll
- lda #0
- sta STKPTR
- Clear
- lda #0
- sta RESULT
- STA RESULT+1
- STA Keyinlen
- lda #32
- sta CARRY
- lda #48
- sta DXSBUF
- lda #1
- sta DISLEN
- jsr Display
- lda #0
- sta DISLEN
- ;--------
- SWITCHMODE
- lda R0
- sta keypress
- SWITCHMODE2
- lda keypress
- SBC #25
- STA Mode
- SWCHMODE2
- LDA RESULT
- ora RESULT+1
- BNE NOZERO
- JSR Clear
- JSR PrintMode
- NOZERO
- LDA RESULT
- STA VALUE
- LDA RESULT+1
- STA VALUE+1
- JSR PrintMode
- JSR DUPLICATE
- PrintMode
- ldx Mode
- BMI BINSWITCH
- BNE HEXSWITCH
- DECSWITCH
- jsr BINDEC
- JSR i_PutString
- .Word Xvalue+10
- .Byte Yvalue
- .Byte ' DEC ',0
- HEXSWITCH
- jsr BINHEX
- JSR i_PutString
- .Word Xvalue+10
- .Byte Yvalue
- .Byte ' HEX ',0
- RTS
- BINSWITCH
- jsr BIN2ST
- JSR i_PutString
- .Word Xvalue+10
- .Byte Yvalue
- .Byte ' BIN ',0
- DUPLICATE
- ldx #16
- DUPLOOP
- lda DISLEN,X
- sta Keyinlen,X
- bpl DUPLOOP
- JSR Display
- RTS
- ;========
- Delete
- ldx Keyinlen
- beq EXITDEL
- bne DELCONT
- stx Keyinlen
- jsr Clear
- DELCONT
- stx Keyinlen
- ldx Mode
- bmi BINDEL
- bne HEXDEL
- DECDEL
- JSR DECBIN
- JMP ENDDEL
- BINDEL
- jsr ST2BIN
- jmp ENDDEL
- HEXDEL
- jsr HEXBIN
- ENDDEL
- jsr SWCHMODE2
- EXITDEL
-